import java.io.UnsupportedEncodingException;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-03-15
 * Time：18:51
 */
public class Main {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s1 = "😄";
        System.out.println(s1.length());
        for (char ch : s1.toCharArray()) {
            System.out.println((int) ch);
        }

        System.out.println();

        String s2 = "I爱u";
        System.out.println(s2.length());
        for (char ch : s2.toCharArray()) {
            System.out.println((int) ch);
        }

        byte[] s2_code = s2.getBytes("utf-8");
        for (byte b : s2_code) {
            System.out.println(b);
        }
    }
}